package com.tembli.skills.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tembli.skills.dao.UserDAO;
import com.tembli.skills.model.User;
import com.tembli.skills.service.UserService;

@Service(value = "userService")
public class UserServiceImpl implements UserService {
	@Autowired
	UserDAO dao;

	public void setUserDao(final UserDAO dao) {
		this.dao = dao;
	}

	public List getUsers() {
		return dao.getUsers();
	}

	public User getUser(final String userId) {
		return dao.getUser(Long.valueOf(userId));
	}

	public void saveUser(final User user) {
		dao.saveUser(user);
	}

	public void removeUser(final String userId) {
		dao.removeUser(Long.valueOf(userId));
	}
}
